{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_jypx/template/public/ygcsslist.css">
<style type="text/css">
    .yg5_key>div{float: left;line-height: 34px;}
    .store_td1{height: 45px;}
    .store_list_img{width: 40px;height: 40px;}
    .yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;}
    .yg5_tr2>td{padding: 10px;border: 1px solid #e5e5e5;text-align: center;}
    .yg5_tr1>td{
        border: 1px solid #e5e5e5;
        padding-left: 15px;
        background-color: #FAFAFA;
        font-weight: bold;
        text-align: center;
    }
    .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
    .jfbtn{background-color: #44ABF7;color: white;}
    .jfbtn:hover{background-color: #44ABF7;color: white;}
</style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>    
    <li class="active"><a href="{php echo $this->createWebUrl('check')}">凭证管理</a></li>
</ul>
<div class="main">
    <!-- <div class="panel panel-default">
        <div class="panel-body">
            <a class="btn btn-primary" href="javascript:location.reload()"><i class="fa fa-refresh"></i>刷新</a>
        </div>
    </div> -->
    <!-- 门店列表部分开始 -->
        <div class="panel panel-default">
            <div class="panel-heading">
                凭证列表
            </div>
            <div class="panel-body" style="padding: 0px 15px;">
                <div class="row">
                    <table class="yg5_tabel col-md-12">
                        <tr class="yg5_tr1">
                            <td class="col-md-1">悬赏标题</td>
                            <td class="col-md-1">提交人昵称</td>
                            <td class="col-md-2">提交人头像</td>
                            <td class="col-md-2">提交时间</td>
                            <td class="col-md-1">状态</td>
                            <td class="col-md-2">审核</td>
                            <td class="col-md-1">操作</td>
                        </tr>
                        {loop $list $row}
                        <tr class="yg5_tr2">
                            <td><div>{$row['title']}</div></td>
                            <td><div>{$row['nickname']}</div></td>
                            <td><img src="{$row['img']}" alt="" style="width: 60px;height: 60px"></td>
                            <td>{$row['create_time']}</td>
                            {if $row['status']==0}
                              <td >
                                  <span class="label label-warning">待审核</span>
                              </td>
                              {elseif $row['status']==1}
                              <td >
                                  <span class="label label-info"> 已通过</span>
                              </td>
                              {elseif $row['status']==2}
                              <td >
                                  <span class="label label-warning"> 已拒绝</span>
                              </td>
                              {/if}
                            {if $row['status']==0}
                          <td>
                                <button type="button" class="btn storeblue btn-xs" data-toggle="modal" data-target="#myModalb{$row['id']}">确认通过</button>
                              <button type="button" class="btn storered btn-xs" data-toggle="modal" data-target="#myModalc{$row['id']}">拒绝通过</button>
                          </td>
                              {elseif $row['status']==1}
                              <td>
                                <!--<button type="button" class="btn storeblue btn-xs" data-toggle="modal" data-target="#myModalb{$row['id']}">确认通过</button>-->
                              <button type="button" class="btn storered btn-xs" data-toggle="modal" data-target="#myModalc{$row['id']}">拒绝通过</button>
                          </td>
                               {elseif $row['status']==2}
                               <td>
                                <button type="button" class="btn storeblue btn-xs" data-toggle="modal" data-target="#myModalb{$row['id']}">确认通过</button>
                              <!--<button type="button" class="btn storegrey btn-xs" data-toggle="modal" data-target="#myModalc{$row['id']}">拒绝通过</button>-->
                          </td>
                            {/if}
                            <!-- <td><a class="btn jfbtn btn-xs" href="{php echo $this->createWebUrl('receivelist', array('good_id' => $row['id'],'type'=>$row['type']))}" title="查看列表">查看列表</a></td> -->
                            <td>
                                <a href="javascript:void(0);" class="storespan btn btn-xs" data-toggle="modal" data-target="#myModal{$row['id']}">
                                    <span class="fa fa-trash-o"></span>
                                    <span class="bianji">删除
                                        <span class="arrowdown"></span>
                                    </span>
                                </a>
                                <a href="{php echo $this->createWebUrl('taskdetails',array('id'=>$row['id']));}" class="storespan btn btn-xs" style="width: 20px;padding-left: 3px">
                                    <span class="fa fa-database"></span>
                                    <span class="bianji">查看凭证详情
                            <span class="arrowdown"></span>
                          </span>
                                </a>
                                <!-- <a class="btn btn-warning btn-xs" href="{php echo $this->createWebUrl('addjfgoods', array('id' => $row['id']))}" title="编辑">改</a>&nbsp;&nbsp;
                                <button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#myModal{$row['id']}">删</button> -->
                            </td>
                        </tr>
                <div class="modal fade" id="myModal{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                      <div class="modal-dialog" role="document">
                        <div class="modal-content">
                          <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                        </div>
                        <div class="modal-body" style="font-size: 20px">
                            确定删除么？
                        </div>
                        <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <a href="{php echo $this->createWebUrl('check', array('op'=>delete,'id'=>$row['id']))}" type="button" class="btn btn-info" >确定</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal fade" id="myModalb{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                                </div>
                                <div class="modal-body" style="font-size: 20px">
                                    确定要通过么？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <a href="{php echo $this->createWebUrl('check', array('op'=>change,'status' => 1, 'id' => $row['id']))}" type="button" class="btn btn-info" >确定</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal fade" id="myModalc{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                                </div>
                                <div class="modal-body" style="font-size: 20px">
                                    确定要拒绝么？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <input type="hidden" name="token" value="{$_W['token']}" />
                                    <input type="hidden" name="id" value="{$row['id']}" />
                                    <a href="{php echo $this->createWebUrl('check', array('op'=>change,'status' => 2, 'id' => $row['id']))}" type="button" class="btn btn-info" >确定</a>
                                </div>
                            </div>
                        </div>
                    </div>
                        {/loop}
                   {if empty($list)}
                        <tr class="yg5_tr2">
                            <td colspan="8">
                              暂无提交的凭证
                            </td>
                        </tr>         
                    {/if}
                    </table>
                </div>
            </div>
        </div>
   
</div>
<div class="text-right we7-margin-top">{$pager}</div>
<script type="text/javascript">
    $(function(){
        // $("#frame-8").addClass("in");
        $("#frame-8").show();
        $("#yframe-8").addClass("wyactive");
    })
</script>